#coding=utf-8
from django.db import models

sma_periods = [3, 5, 10, 20, 30, 60, 100, 120, 200, 250]
class SMAPrice(models.Model):
    '''简单移动平均线'''
    exday = models.ForeignKey('Exday', unique=True)
    
    ap3 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap5 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap10 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    
    ap20 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap30 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap60 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    
    ap100 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap120 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap200 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    ap250 = models.DecimalField( max_digits=8, decimal_places=2, null=True, blank=True)
    
    class Admin:pass
    class Meta:
        app_label = 'stock' 

class SMAHsl(models.Model):
    '''简单移动平均线'''
    exday = models.ForeignKey('Exday', unique=True)
    
    ah3 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah5 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah10 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    
    ah20 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah30 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah60 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    
    ah100 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah120 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah200 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )
    ah250 = models.DecimalField( max_digits=6, decimal_places=2, null=True, blank=True )

    class Admin:pass
    class Meta:
        app_label = 'stock' 